typedef freqLinkList
{
	int data;
	int freq;
	struct freqLinkList *next;
}freqLinkList;

Status locate(freqLinkList *L,int x)
{
	freqLinkList *p;
	freqLinkList *head = L;
	while(L -> next -> data != x)
		L = L -> next;	
	p = L -> next;
	L -> next = p -> next;
	p -> freq ++;
	L = head;
	while(p -> freq < L -> next -> freq)
		L = L -> next;
	p -> next = L -> next;
	L -> next = p;	
}

